package main.Q1101_1200;

public class Q1131_1140 {
    public static void main(String[] args) {
        System.out.println("Question1131：");
        System.out.println("Question1132：");
        System.out.println("Question1133：");
        System.out.println("Question1134：");
        System.out.println("Question1135：");
        System.out.println("Question1136：");
        System.out.println("Question1137：第N个泰波那契数");
        System.out.println(Question1137.tribonacci(25));
        System.out.println("Question1138：");
        System.out.println("Question1139：");
        System.out.println("Question1140：");
    }
}

class Question1137{
    public static int tribonacci(int n) {
        if (n==0) return 0;
        else if (n==1||n==2) return 1;
        int first=0,second=1,third=1,result=0;
        for (int i=3;i<=n;i++){
            result=first+second+third;
            first=second;
            second=third;
            third=result;
        }
        return result;
    }
}